home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / advc11.zip / VIDEO.C < prev   
Text File  |  1987-02-07  |  2KB  |  79 lines

  1. void bkscroll(lcol,trow,rcol,brow,lines)  /* scroll a screen area down */
  2.    int lcol, trow, rcol, brow, lines;
  3. {
  4.    union REGS inregs;
  5.    union REGS outregs;
  6.  
  7.    inregs.h.ah = 15;                    /* get active display page */
  8.    int86(0x10,&inregs,&outregs);
  9.    inregs.h.bh = outregs.h.bh;
  10.    inregs.h.dl = --lcol;
  11.    inregs.h.dh = --trow;
  12.    inregs.h.ah = 2;                     /* set cursor position */
  13.    int86(0x10,&inregs,&outregs);
  14.    inregs.h.ah = 8;                     /* get color/attribute */
  15.    int86(0x10,&inregs,&outregs);
  16.    inregs.h.bh = outregs.h.ah;
  17.    inregs.h.cl = lcol;
  18.    inregs.h.ch = trow;
  19.    inregs.h.dl = --rcol;
  20.    inregs.h.dh = --brow;
  21.    inregs.h.al = lines;
  22.    inregs.h.ah = 7;                     /* do the backscroll */
  23.    int86(0x10,&inregs,&outregs);
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30. void clreol()                         /* clear from cursor to end of line */
  31. {
  32.    union REGS inregs;
  33.    union REGS outregs;
  34.    int attr, columns;
  35.  
  36.    inregs.h.ah = 15;                       /* get display page, columns */
  37.    int86(0x10,&inregs,&outregs);
  38.    inregs.h.bh = outregs.h.bh;
  39.    columns = outregs.h.ah;
  40.    inregs.h.ah = 8;                        /* get color/attribute */
  41.    int86(0x10,&inregs,&outregs);
  42.    attr = outregs.h.ah;
  43.    inregs.h.ah = 3;                        /* get cursor position */
  44.    int86(0x10,&inregs,&outregs);
  45.    inregs.h.bl = attr;
  46.    inregs.x.cx = columns - outregs.h.dl;
  47.    inregs.x.ax = 0x0920;                   /* write spaces until EOLN */
  48.    int86(0x10,&inregs,&outregs);
  49. }
  50.  
  51.  
  52.  
  53.  
  54.  
  55. void scroll(lcol,trow,rcol,brow,lines)   /* scroll a screen area up */
  56.    int lcol, trow, rcol, brow, lines;
  57. {
  58.    union REGS inregs;
  59.    union REGS outregs;
  60.  
  61.    inregs.h.ah = 15;                    /* get active display page */
  62.    int86(0x10,&inregs,&outregs);
  63.    inregs.h.bh = outregs.h.bh;
  64.    inregs.h.dl = --lcol;
  65.    inregs.h.dh = --trow;
  66.    inregs.h.ah = 2;                     /* set cursor position */
  67.    int86(0x10,&inregs,&outregs);
  68.    inregs.h.ah = 8;                     /* get color/attribute */
  69.    int86(0x10,&inregs,&outregs);
  70.    inregs.h.bh = outregs.h.ah;
  71.    inregs.h.cl = lcol;
  72.    inregs.h.ch = trow;
  73.    inregs.h.dl = --rcol;
  74.    inregs.h.dh = --brow;
  75.    inregs.h.al = lines;
  76.    inregs.h.ah = 6;                     /* do the scroll */
  77.    int86(0x10,&inregs,&outregs);
  78. }
  79.